Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: header sync must allow transition to archival/pruned if tip is behind #3520

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Nov 1, 2021

Description

  • Changes header sync to check the metadata height as there is still one case where it is valid for peers to enter header sync when all headers are synced
  • Use last chain header instead of tip chain header when determining header sync state

Motivation and Context

Node would ban peer when headers are synced and sync is being resumed

How Has This Been Tested?

Manually - header sync does not ban peer in this case

@aviator-app aviator-app bot added mq-failed and removed mq-failed labels Nov 2, 2021
@aviator-app aviator-app bot merged commit e028386 into tari-project:development Nov 3, 2021
@sdbondi sdbondi deleted the core-header-sync-check-tip-before-ban branch November 3, 2021 07:07
stringhandler added a commit that referenced this pull request Nov 4, 2021
BREAKING CHANGES

* implement new CipherSeed and upgrade encryption KDF (#3505)

Features

* add a Rejected status to TransactionStatus ([#3512](#3512)) ([c65a01c](c65a01c))
* add caching and clippy annotations to CI ([#3518](#3518)) ([beacb9e](beacb9e))
* implement new CipherSeed and upgrade encryption KDF ([#3505](#3505)) ([ef4f84f](ef4f84f))

Bug Fixes

* edge case fix for integer pair iter ([#3508](#3508)) ([097e3e2](097e3e2))
* header sync must allow transition to archival/pruned if tip is behind ([#3520](#3520)) ([e028386](e028386))
aviator-app bot pushed a commit that referenced this pull request Dec 3, 2021
…fixes (#3521)

Description
---
- delete inputs behind pruning horizon during pruned mode cleanup
- keep cumulative utxo_sum and kernel_sum in `BlockAccumulatedData`
- prune spent outputs that may have not been pruned in previous horizon sync
- bugfix: check rangeproof validation result in horizon sync (failed validation was ignored)
- parallelize rangeproof verification for horizon sync
- prune blocks between new and old horizon height if necessary before syncing 
- fix off-by-one in pruning horizon (pruning horizon is consistently defined as the last pruned block inclusive)
- minor optimisations in horizon sync
- new blockchain db unit tests

Motivation and Context
---
Inputs behind the pruning horizon were not pruned as propagated blocks arrive.
Breaking change: Blockchain database will need to be resynced

Based on #3520 

How Has This Been Tested?
---
Cucumber tests pass
Manually, horizon sync to tip and wallet recovery
@sdbondi sdbondi restored the core-header-sync-check-tip-before-ban branch February 3, 2022 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants